<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: fixed_point&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.05</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">fixed_point&lt; T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Arbitrary fixed-point arithmetic class.  
 <a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad9fb776e0556cf222c31feb9f372ea32"><td class="memTemplParams" colspan="2">template&lt;typename U &gt; </td></tr>
<tr class="memitem:ad9fb776e0556cf222c31feb9f372ea32"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#ad9fb776e0556cf222c31feb9f372ea32">fixed_point</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; U &gt; val, uint8_t p)</td></tr>
<tr class="memdesc:ad9fb776e0556cf222c31feb9f372ea32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor (from different fixed point type)  <a href="#ad9fb776e0556cf222c31feb9f372ea32">More...</a><br /></td></tr>
<tr class="separator:ad9fb776e0556cf222c31feb9f372ea32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2449f6f85fd30e253be0a03fa9c5baa4"><td class="memTemplParams" colspan="2">template&lt;typename U , typename  = typename std::enable_if&lt;std::is_integral&lt;U&gt;::value&gt;::type&gt; </td></tr>
<tr class="memitem:a2449f6f85fd30e253be0a03fa9c5baa4"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a2449f6f85fd30e253be0a03fa9c5baa4">fixed_point</a> (U val, uint8_t p, bool is_raw=false)</td></tr>
<tr class="memdesc:a2449f6f85fd30e253be0a03fa9c5baa4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor (from integer)  <a href="#a2449f6f85fd30e253be0a03fa9c5baa4">More...</a><br /></td></tr>
<tr class="separator:a2449f6f85fd30e253be0a03fa9c5baa4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5047b169040344c060aa685e9f63627c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a5047b169040344c060aa685e9f63627c">fixed_point</a> (float val, uint8_t p)</td></tr>
<tr class="memdesc:a5047b169040344c060aa685e9f63627c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor (from float)  <a href="#a5047b169040344c060aa685e9f63627c">More...</a><br /></td></tr>
<tr class="separator:a5047b169040344c060aa685e9f63627c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c96f1365088f36447883d79469dc52b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a4c96f1365088f36447883d79469dc52b">fixed_point</a> (std::string str, uint8_t p)</td></tr>
<tr class="memdesc:a4c96f1365088f36447883d79469dc52b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor (from float string)  <a href="#a4c96f1365088f36447883d79469dc52b">More...</a><br /></td></tr>
<tr class="separator:a4c96f1365088f36447883d79469dc52b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac73fe4dd453222d7858e879f5a2871c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#aac73fe4dd453222d7858e879f5a2871c">operator=</a> (const <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &amp;)=default</td></tr>
<tr class="memdesc:aac73fe4dd453222d7858e879f5a2871c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default copy constructor.  <a href="#aac73fe4dd453222d7858e879f5a2871c">More...</a><br /></td></tr>
<tr class="separator:aac73fe4dd453222d7858e879f5a2871c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88fd8172c8f0683b0d1876631427b4f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a88fd8172c8f0683b0d1876631427b4f5">operator=</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a88fd8172c8f0683b0d1876631427b4f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move constructor.  <a href="#a88fd8172c8f0683b0d1876631427b4f5">More...</a><br /></td></tr>
<tr class="separator:a88fd8172c8f0683b0d1876631427b4f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89a5e8d2204b9df9ed348b109558815b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89a5e8d2204b9df9ed348b109558815b">fixed_point</a> (const <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &amp;)=default</td></tr>
<tr class="memdesc:a89a5e8d2204b9df9ed348b109558815b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default copy assignment operator.  <a href="#a89a5e8d2204b9df9ed348b109558815b">More...</a><br /></td></tr>
<tr class="separator:a89a5e8d2204b9df9ed348b109558815b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab90921d2fef01d0313392f9437ef12d5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#ab90921d2fef01d0313392f9437ef12d5">fixed_point</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:ab90921d2fef01d0313392f9437ef12d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move assignment operator.  <a href="#ab90921d2fef01d0313392f9437ef12d5">More...</a><br /></td></tr>
<tr class="separator:ab90921d2fef01d0313392f9437ef12d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae80f6077a5ac6ce1710cda5b30039890"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#ae80f6077a5ac6ce1710cda5b30039890">operator float</a> () const </td></tr>
<tr class="memdesc:ae80f6077a5ac6ce1710cda5b30039890"><td class="mdescLeft">&#160;</td><td class="mdescRight">Float conversion operator.  <a href="#ae80f6077a5ac6ce1710cda5b30039890">More...</a><br /></td></tr>
<tr class="separator:ae80f6077a5ac6ce1710cda5b30039890"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dc268e2f29a84e2a777befb77128c1a"><td class="memTemplParams" colspan="2">template&lt;typename U , typename  = typename std::enable_if&lt;std::is_integral&lt;T&gt;::value&gt;::type&gt; </td></tr>
<tr class="memitem:a2dc268e2f29a84e2a777befb77128c1a"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a2dc268e2f29a84e2a777befb77128c1a">operator U</a> () const </td></tr>
<tr class="memdesc:a2dc268e2f29a84e2a777befb77128c1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Integer conversion operator.  <a href="#a2dc268e2f29a84e2a777befb77128c1a">More...</a><br /></td></tr>
<tr class="separator:a2dc268e2f29a84e2a777befb77128c1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c0a35a6e4249b5d463ddb797dbe3ed8"><td class="memTemplParams" colspan="2">template&lt;typename U &gt; </td></tr>
<tr class="memitem:a7c0a35a6e4249b5d463ddb797dbe3ed8"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a7c0a35a6e4249b5d463ddb797dbe3ed8">operator fixed_point&lt; U &gt;</a> ()</td></tr>
<tr class="memdesc:a7c0a35a6e4249b5d463ddb797dbe3ed8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert to different fixed point of different type but same precision.  <a href="#a7c0a35a6e4249b5d463ddb797dbe3ed8">More...</a><br /></td></tr>
<tr class="separator:a7c0a35a6e4249b5d463ddb797dbe3ed8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2654e1d67fbb9afb7fb00ee7ec521c11"><td class="memTemplParams" colspan="2">template&lt;typename U &gt; </td></tr>
<tr class="memitem:a2654e1d67fbb9afb7fb00ee7ec521c11"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a2654e1d67fbb9afb7fb00ee7ec521c11">operator+=</a> (const <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; U &gt; &amp;rhs)</td></tr>
<tr class="memdesc:a2654e1d67fbb9afb7fb00ee7ec521c11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Arithmetic += assignment operator.  <a href="#a2654e1d67fbb9afb7fb00ee7ec521c11">More...</a><br /></td></tr>
<tr class="separator:a2654e1d67fbb9afb7fb00ee7ec521c11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af180cc5812cd005d63a4ec8eea34ae2e"><td class="memTemplParams" colspan="2">template&lt;typename U &gt; </td></tr>
<tr class="memitem:af180cc5812cd005d63a4ec8eea34ae2e"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#af180cc5812cd005d63a4ec8eea34ae2e">operator-=</a> (const <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; U &gt; &amp;rhs)</td></tr>
<tr class="memdesc:af180cc5812cd005d63a4ec8eea34ae2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Arithmetic -= assignment operator.  <a href="#af180cc5812cd005d63a4ec8eea34ae2e">More...</a><br /></td></tr>
<tr class="separator:af180cc5812cd005d63a4ec8eea34ae2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fe723fdc332e453550710b2925002a0"><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a> () const </td></tr>
<tr class="memdesc:a3fe723fdc332e453550710b2925002a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Raw value accessor.  <a href="#a3fe723fdc332e453550710b2925002a0">More...</a><br /></td></tr>
<tr class="separator:a3fe723fdc332e453550710b2925002a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89deb954a617641af987e59a483ca5e9"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a> () const </td></tr>
<tr class="memdesc:a89deb954a617641af987e59a483ca5e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Precision accessor.  <a href="#a89deb954a617641af987e59a483ca5e9">More...</a><br /></td></tr>
<tr class="separator:a89deb954a617641af987e59a483ca5e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80db15090eed5a0bb5e7977eabeae132"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a> (uint8_t p)</td></tr>
<tr class="memdesc:a80db15090eed5a0bb5e7977eabeae132"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rescale a fixed point to a new precision.  <a href="#a80db15090eed5a0bb5e7977eabeae132">More...</a><br /></td></tr>
<tr class="separator:a80db15090eed5a0bb5e7977eabeae132"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br />
class arm_compute::test::fixed_point_arithmetic::fixed_point&lt; T &gt;</h3>

<p>Arbitrary fixed-point arithmetic class. </p>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00098">98</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad9fb776e0556cf222c31feb9f372ea32"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; U &gt;&#160;</td>
          <td class="paramname"><em>val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>p</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor (from different fixed point type) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Fixed point </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>Fixed point precision </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00110">110</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>

<p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00236">fixed_point&lt; T &gt;::raw()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00252">fixed_point&lt; T &gt;::rescale()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00372">constant_expr&lt; T &gt;::saturate_cast()</a>.</p>
<div class="fragment"><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        : _value(0), _fixed_point_position(p)</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        assert(p &gt; 0 &amp;&amp; p &lt; std::numeric_limits&lt;T&gt;::digits);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        T v = 0;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keywordflow">if</span>(std::numeric_limits&lt;T&gt;::digits &lt; std::numeric_limits&lt;U&gt;::digits)</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        {</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            val.rescale(p);</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            v = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">detail::constant_expr&lt;T&gt;::saturate_cast</a>(val.raw());</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        }</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        {</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            <span class="keyword">auto</span> v_cast = <span class="keyword">static_cast&lt;</span>fixed_point&lt;T&gt;<span class="keyword">&gt;</span>(val);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            v_cast.rescale(p);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            v = v_cast.raw();</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        }</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        _value = <span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(v);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    }</div><div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a59cfd98dfc03fbc5540092aa196d7187"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::saturate_cast</a></div><div class="ttdeci">static constexpr T saturate_cast(U val)</div><div class="ttdoc">Saturate given number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00372">FixedPoint.h:372</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2449f6f85fd30e253be0a03fa9c5baa4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> </td>
          <td>(</td>
          <td class="paramtype">U&#160;</td>
          <td class="paramname"><em>val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>is_raw</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor (from integer) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Integer value to be represented as fixed point </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>Fixed point precision </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">is_raw</td><td>If true val is a raw fixed point value else an integer </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00136">136</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        : _value(val &lt;&lt; p), _fixed_point_position(p)</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    {</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keywordflow">if</span>(is_raw)</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        {</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;            _value = val;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        }</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    }</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5047b169040344c060aa685e9f63627c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>p</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor (from float) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Float value to be represented as fixed point </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>Fixed point precision </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00149">149</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        : _value(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a682a2eb8869b48647719e194cbbcb4e1">detail::constant_expr&lt;T&gt;::to_fixed</a>(val, p)), _fixed_point_position(p)</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    {</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        assert(p &gt; 0 &amp;&amp; p &lt; std::numeric_limits&lt;T&gt;::digits);</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    }</div><div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a682a2eb8869b48647719e194cbbcb4e1"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a682a2eb8869b48647719e194cbbcb4e1">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::to_fixed</a></div><div class="ttdeci">static constexpr T to_fixed(float val, uint8_t p)</div><div class="ttdoc">Convert a single precision floating point value to a fixed point representation given its precision...</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00349">FixedPoint.h:349</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4c96f1365088f36447883d79469dc52b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>p</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor (from float string) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">str</td><td>Float string to be represented as fixed point </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>Fixed point precision </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00159">159</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        : _value(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a682a2eb8869b48647719e194cbbcb4e1">detail::constant_expr&lt;T&gt;::to_fixed</a>(<a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aa4152693b62db2a43edcc0039de95e38">support::cpp11::stof</a>(str), p)), _fixed_point_position(p)</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    {</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        assert(p &gt; 0 &amp;&amp; p &lt; std::numeric_limits&lt;T&gt;::digits);</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    }</div><div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a682a2eb8869b48647719e194cbbcb4e1"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a682a2eb8869b48647719e194cbbcb4e1">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::to_fixed</a></div><div class="ttdeci">static constexpr T to_fixed(float val, uint8_t p)</div><div class="ttdoc">Convert a single precision floating point value to a fixed point representation given its precision...</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00349">FixedPoint.h:349</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_aa4152693b62db2a43edcc0039de95e38"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aa4152693b62db2a43edcc0039de95e38">arm_compute::support::cpp11::stof</a></div><div class="ttdeci">int stof(Ts &amp;&amp;...args)</div><div class="ttdoc">Convert string values to float. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00242">ToolchainSupport.h:242</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a89a5e8d2204b9df9ed348b109558815b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default copy assignment operator. </p>

</div>
</div>
<a class="anchor" id="ab90921d2fef01d0313392f9437ef12d5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; &amp;&amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default move assignment operator. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a7c0a35a6e4249b5d463ddb797dbe3ed8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">operator <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; U &gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert to different fixed point of different type but same precision. </p>
<dl class="section note"><dt>Note</dt><dd>Down-conversion might fail. </dd></dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00195">195</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>

<p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00372">constant_expr&lt; T &gt;::saturate_cast()</a>, and <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::U</a>.</p>
<div class="fragment"><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    {</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">U</a> val = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">U</a><span class="keyword">&gt;</span>(_value);</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <span class="keywordflow">if</span>(std::numeric_limits&lt;U&gt;::digits &lt; std::numeric_limits&lt;T&gt;::digits)</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        {</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;            val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">detail::constant_expr&lt;U&gt;::saturate_cast</a>(_value);</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        }</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <span class="keywordflow">return</span> fixed_point&lt;U&gt;(val, _fixed_point_position, <span class="keyword">true</span>);</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    }</div><div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a59cfd98dfc03fbc5540092aa196d7187"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::saturate_cast</a></div><div class="ttdeci">static constexpr T saturate_cast(U val)</div><div class="ttdoc">Saturate given number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00372">FixedPoint.h:372</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::Channel::U</a></div><div class="ttdoc">Cb/U channel. </div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae80f6077a5ac6ce1710cda5b30039890"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">operator float </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Float conversion operator. </p>
<dl class="section return"><dt>Returns</dt><dd>Float representation of fixed point </dd></dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00177">177</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>

<p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00327">constant_expr&lt; T &gt;::to_float()</a>.</p>
<div class="fragment"><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    {</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a995c73a5ff995cc1b4c0c730892c792a">detail::constant_expr&lt;T&gt;::to_float</a>(_value, _fixed_point_position);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    }</div><div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a995c73a5ff995cc1b4c0c730892c792a"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a995c73a5ff995cc1b4c0c730892c792a">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::to_float</a></div><div class="ttdeci">static constexpr float to_float(T val, uint8_t p)</div><div class="ttdoc">Convert a fixed point value to float given its precision. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00327">FixedPoint.h:327</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2dc268e2f29a84e2a777befb77128c1a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">operator U </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Integer conversion operator. </p>
<dl class="section return"><dt>Returns</dt><dd>Integer representation of fixed point </dd></dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00186">186</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>

<p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00338">constant_expr&lt; T &gt;::to_int()</a>, and <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::U</a>.</p>
<div class="fragment"><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    {</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a918ab57096fdfe5e2cbf70de5145b9fa">detail::constant_expr&lt;T&gt;::to_int</a>(_value, _fixed_point_position);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    }</div><div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a918ab57096fdfe5e2cbf70de5145b9fa"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a918ab57096fdfe5e2cbf70de5145b9fa">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::to_int</a></div><div class="ttdeci">static constexpr T to_int(T val, uint8_t p)</div><div class="ttdoc">Convert a fixed point value to integer given its precision. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00338">FixedPoint.h:338</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2654e1d67fbb9afb7fb00ee7ec521c11"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt;&amp; operator+= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; U &gt; &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Arithmetic += assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>Fixed point operand</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to this fixed point </dd></dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00212">212</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>

<p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00236">fixed_point&lt; T &gt;::raw()</a>.</p>
<div class="fragment"><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    {</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        fixed_point&lt;T&gt; val(rhs, _fixed_point_position);</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;        _value += val.raw();</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    }</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af180cc5812cd005d63a4ec8eea34ae2e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt;&amp; operator-= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; U &gt; &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Arithmetic -= assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>Fixed point operand</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to this fixed point </dd></dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">225</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>

<p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00236">fixed_point&lt; T &gt;::raw()</a>.</p>
<div class="fragment"><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    {</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        fixed_point&lt;T&gt; val(rhs, _fixed_point_position);</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        _value -= val.raw();</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    }</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aac73fe4dd453222d7858e879f5a2871c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&amp; operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default copy constructor. </p>

</div>
</div>
<a class="anchor" id="a88fd8172c8f0683b0d1876631427b4f5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&amp; operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; &amp;&amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default move constructor. </p>

</div>
</div>
<a class="anchor" id="a89deb954a617641af987e59a483ca5e9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t precision </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Precision accessor. </p>
<dl class="section return"><dt>Returns</dt><dd>Precision of fixed point </dd></dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00244">244</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>

<p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::abs()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00540">functions::add()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00511">functions::clamp()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00611">functions::div()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00728">functions::exp()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00765">functions::inv_sqrt()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00411">functions::isequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00438">functions::isgreater()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00453">functions::isgreaterequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00468">functions::isless()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00483">functions::islessequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00681">functions::log()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00590">functions::mul()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00522">functions::negate()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00639">functions::shift_left()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00657">functions::shift_right()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00565">functions::sub()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00796">functions::tanh()</a>.</p>
<div class="fragment"><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    {</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <span class="keywordflow">return</span> _fixed_point_position;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    }</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3fe723fdc332e453550710b2925002a0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T raw </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Raw value accessor. </p>
<dl class="section return"><dt>Returns</dt><dd>Raw fixed point value </dd></dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00236">236</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>

<p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::abs()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00540">functions::add()</a>, <a class="el" href="validation_2reference_2_batch_normalization_layer_8cpp_source.xhtml#l00041">arm_compute::test::validation::reference::batch_normalization_layer()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00511">functions::clamp()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00611">functions::div()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00110">fixed_point&lt; T &gt;::fixed_point()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00765">functions::inv_sqrt()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00411">functions::isequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00438">functions::isgreater()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00453">functions::isgreaterequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00468">functions::isless()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00483">functions::islessequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00681">functions::log()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00590">functions::mul()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00522">functions::negate()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00212">fixed_point&lt; T &gt;::operator+=()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::operator-=()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00639">functions::shift_left()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00657">functions::shift_right()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00399">functions::signbit()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00565">functions::sub()</a>.</p>
<div class="fragment"><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    {</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        <span class="keywordflow">return</span> _value;</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    }</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a80db15090eed5a0bb5e7977eabeae132"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void rescale </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Rescale a fixed point to a new precision. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>New fixed point precision </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00252">252</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>

<p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00372">constant_expr&lt; T &gt;::saturate_cast()</a>.</p>

<p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00540">functions::add()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00110">fixed_point&lt; T &gt;::fixed_point()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00411">functions::isequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00438">functions::isgreater()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00453">functions::isgreaterequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00468">functions::isless()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00483">functions::islessequal()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00565">functions::sub()</a>.</p>
<div class="fragment"><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    {</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        assert(p &gt; 0 &amp;&amp; p &lt; std::numeric_limits&lt;T&gt;::digits);</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> traits::promote&lt;T&gt;::type;</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        promoted_T val   = _value;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <span class="keywordflow">if</span>(p &gt; _fixed_point_position)</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        {</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;            val &lt;&lt;= (p - _fixed_point_position);</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        }</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(p &lt; _fixed_point_position)</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        {</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;            uint8_t pbar = _fixed_point_position - p;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;            val += (pbar != 0) ? (1 &lt;&lt; (pbar - 1)) : 0;</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;            val &gt;&gt;= pbar;</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        }</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        _value                = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">detail::constant_expr&lt;T&gt;::saturate_cast</a>(val);</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        _fixed_point_position = p;</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    }</div><div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a59cfd98dfc03fbc5540092aa196d7187"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::saturate_cast</a></div><div class="ttdeci">static constexpr T saturate_cast(U val)</div><div class="ttdoc">Saturate given number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00372">FixedPoint.h:372</a></div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>tests/validation/<a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test.xhtml">test</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml">fixed_point_arithmetic</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a></li>
    <li class="footer">Generated on Wed May 23 2018 11:36:44 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
